<template>
  <div id="app">
    <ul>
      <li v-for="item in arr" :key="item">{{ item }}</li>
    </ul>
    <button @click="btn">动一动</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: ["帅哥", "美女", "程序员"],
    };
  },
  methods: {
    btn() {
    //   console.log(this.arr.push(this.arr[0]));
      //头部数据加到末尾
      this.arr.push(this.arr[0]);
      //再把头部数据删掉
      this.arr.shift();
    },
  },
};
</script>

<style>
</style>